import request from '@/utils/request'

// 查询   场内交易
export function getOtcTradeByPage(query) {
    return request({
        url: '/trade/trade/querySimpleTradeByPage.action',
        method: 'get',
        params: query
    })
}
// 新增场内交易
export function insertTrade(tradeFrom) {
    return request({
        url: '/trade/trade/insertTrade.action',
        method: 'post',
        data: tradeFrom
    })
}
// 修改场内交易
export function updateTrade(tradeFrom) {
    return request({
        url: '/trade/trade/updateTrade.action',
        method: 'post',
        data: tradeFrom
    })
}

// 删除场内交易
export function deleteTrade(trade) {
    return request({
        url: '/trade/trade/deleteTrade.action',
        method: 'post',
        data: trade
    })
}

// 撤单
export function revertTrade(trade) {
    return request({
        url: '/trade/trade/revertTrade.action',
        method: 'post',
        data: trade
    })
}

// 导出   场内交易
export function importOtc(query) {
    return request({
        url: '/trade/trade/querySimpleTradeByPage.action',
        method: 'get',
        params: query
    })
}

//根据标的分组查询场内交易
export function getOtcTradeGroup(query) {
    return request({
        url: '/trade/trade/querysimpleTradeGroup.action',
        method: 'get',
        params: query
    })
}
